package com.kaifa.test;
import java.util.Date;
import java.util.Random;
import java.util.Scanner;

public class GameDemo {
    public static void main(String[] args) {
        Random ran = new Random();
        int num = ran.nextInt(1);
        Scanner scan = new Scanner(System.in);

        for(int i=1;i<=3;i++){
            int num2 = scan.nextInt();
            if(num>num2){
                System.out.println("你猜测数值小了"+new Date());
            }
            if(num<num2){
                System.out.println("你猜测数值大了"+new Date());
            }
            if(num==num2){
                System.out.println("你猜测数值正确"+new Date());
                System.exit(0);
            }
        }
        System.out.println("您的机会已用尽，随机数是："+num);
        scan.close();








    }

}
